package com.yy.boot.controller;

import com.yy.boot.entity.User;
import com.yy.boot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by 野马 on 2019/6/11.
 */
@Controller
public class BootController {
    @Autowired
    private UserService userService;

    @RequestMapping("/hello")
    @ResponseBody
    public List<User> Hello(){
        List<User> users = userService.selectAll();
        return users;
    }
}
